﻿using System;
using System.Xml.Serialization;
using ButtonBuilder.Plugin;

namespace ButtonBuilder.Data
{
    public class Button
    {
        public Button()
        {
            ClickAction = new EmptyAction();
        }

        public Button(Type buttonType) : base()
        {
            ButtonType = buttonType.FullName;
        }

        [XmlAttribute("type")]
        public string ButtonType { get; set; }

        public string Caption { get; set; }

        public bool ImageVisible { get; set; }

        public string ImagePath { get; set; }

        public string MediaPath { get; set; }

        public string Background { get; set; }

        public double Top { get; set; }

        public double Left { get; set; }

        public double Width { get; set; }

        public double Height { get; set; }

        public int TabIndex { get; set; }

        public int ZIndex { get; set; }

        public ButtonFont Font { get; set; }

        [XmlElement(Type = typeof(PluginSerializer))]
        public Plugin.Action ClickAction { get; set; }
    }
}
